package com.sky.service.impl;

import com.sky.context.BaseContext;
import com.sky.dto.ExerciseDTO;
import com.sky.entity.Exercise;
import com.sky.entity.Food;
import com.sky.mapper.ExerciseMapper;
import com.sky.mapper.FoodMapper;
import com.sky.service.ExerciseService;
import com.sky.service.FoodService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExerciseServiceImpl implements ExerciseService {
    @Autowired
    private ExerciseMapper  exerciseMapper;
    public void addPlan(ExerciseDTO exerciseDTO){
        Exercise exercise=new Exercise();
        BeanUtils.copyProperties(exerciseDTO,exercise);
        exerciseMapper.insert(exercise);
    }
}
